#ifndef UTIL_H
#define UTIL_H

#include <iostream>
#include <config.h>
#include <vector>

using std::string;

static std::vector<string> spilit(string str, char p) {
    std::vector<string> v;
    string buffer = "";
    for(size_t i = 0; i < str.length(); i ++) {
        if (str[i] == p) {
            if (buffer == "") {continue;}
            v.push_back(buffer);
            buffer = "";
        }
        else {
            buffer = buffer + str[i];
        }
    }
    v.push_back(buffer);
    return v;
}

#endif // UTIL_H
